//app.js

var settings = require('settings.js');
var  util = require('utils/util.js');
// var url ='https://apis.ixinghui.com/ixinghui/applet/course';
var  url = 'https://apis.ixinghui.com/ixinghui/applet/course'; 
// var url = 'http://12407.imwork.net:35445/ixinghui/applet/course'; 
// var url = 'http://16p73762o8.iask.in:43521/ixinghui/applet/course';
var  openId;
var wxVersion;
App({
  onLaunch: function () {
      let that=this;
      wx.setStorageSync('qiehuan', 0);//切换页面相关
      wx.setStorageSync('indexI', 0);
    // 登录
    wx.login({
        success: function (res) {
            console.log(res);
            wx.setStorageSync("code", res.code);
        }
    });

  },
 
 
  onshow:function(){

  },
  globalData: {
      url: url,
      userInfo: null,
      num: 0,   //答案区下标
      code: null,
      got_point: 0, //用户总分
      user_id: null,  //用户id
      openId: null,
      imgUrls: [],
      isshow: []
  }
})
/**
 * 接口1、 getAppletUnionId   encryptedData    iv      code
 *    2、 AppletIndexBanner 不用传参数
 *    3、 getAppletCourseList    openId userId
 *    4、getAppletCourse  openId  productId
 *    5、getAppletLessonList  openId userId  productId
 *    6、getOrderListAppLet  openId userId
 *    7、getWxPay openId money productId   （openIds）
 *    8、insertAppletOrder   openId userId  productId
 */
